package com.example.demo.process;


import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.PreDestroy;

/**
 * @author Administrator
 */
@Component
@Slf4j
public class CustomRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) {
        log.info(" - - - - - - CustomRunner run - - - - - - ");
    }

    @PreDestroy
    public void onShutdown() {
        log.info(" - - - - - - onShutdown - - - - - - ");
    }
}
